<?php
include("include/class.function.php");
$inancm = new inancm();

$get_port = $inancm->select_db("select * from inancm_portfolio where port_show = 1 order by RAND()");
//$inancm->pre($get_port);
error_reporting(E_ALL ^ E_NOTICE);
?>

<script>
$(document).ready(function(){

    var $container = $('#portfolio-container')
    // initialize Isotope
        $container.isotope({
            // options...
            resizable: false, // disable normal resizing
            layoutMode : 'fitRows',
			itemSelector : '.element3',
            animationEngine : 'best-available',

            // set columnWidth to a percentage of container width
            masonry: { columnWidth: $container.width() / 5 }
        });

        // update columnWidth on window resize
        $(window).smartresize(function(){
            $container.isotope({
            // update columnWidth to a percentage of container width
            masonry: { columnWidth: $container.width() / 5 }
            });
        });
        $container.imagesLoaded( function(){

                $container.isotope({
            // options...
                });
        });

        $('#portfolio-filter a').click(function(){
            var selector = $(this).attr('data-filter');
            $container.isotope({ filter: selector });
            return false;
        });
});
</script>
<script type="text/javascript" charset="utf-8">
  $(document).ready(function(){
    $("a[rel^='prettyPhoto']").prettyPhoto();
  });
</script>

    <!-- Start Main Body Wrap -->
    <div id="main-wrap" style="margin-top:-15px;">
        
        <!-- Start Box -->
        <div class="boxes-full">        
        	<div class="boxes-padding fullpadding">            	
                <!-- Start None Split Section -->
            	<div class="splitnone">                
                  <div id="portfolio-filter-choice"><h1>iNanCM Portfolio</h1></div>                
                  <!-- Start Portfolio Filter -->
               	  <div id="portfolio-filter">                    
                    	<ul>                        	
                            <li><strong>Filter: </strong></li>
                            <li><a href="#portfolio-filter" title="All" class="orangebutton smallrectange" data-filter="*">show all</a></li>
                        	<li><a href="#portfolio-filter" title="Web Design" class="orangebutton smallrectange" data-filter=".web">Website</a></li>
                            <li><a href="#portfolio-filter" title="System" class="orangebutton smallrectange" data-filter=".system">System</a></li>
                            <li><a href="#portfolio-filter" title="Flash" class="orangebutton smallrectange" data-filter=".flash">Flash</a></li>                        
                        </ul>                    
                    </div>
                    <!-- End Portfolio Filter -->                
                </div>
            	<!-- End None Split Section -->
            </div>
            <span class="box-arrow"> </span>        
        </div>
        <!-- End Box -->
        
        
        <!-- Start Box -->
        <div class="boxes-full">
        
        	<div class="boxes-padding fullpadding">
            	
                <!-- Start None Split Section -->
            	<div class="splitnone">                
                	<div id="portfolio-container">
                    
                    	<!-- Start 4 column portfolio -->
                        <style type="text/css">
							a { text-decoration:none; color:#069; font-size:14px;}
							a:hover { text-decoration:none; color:#0CF; font-size:14px;}
						</style>
                        
                        <?php foreach($get_port as $val) { ?>
                        <div class="element3 <?=$val['port_tag']?>">                        
                        	<div class="portfoliowrap">                                                
                                <div class="title"><?=$val['port_name']?><span class="titlearrow"></span></div>
                                <div class="portfolioimage"><a href="images/latest-projects/larger-images/<?=$val['port_image']?>" rel="prettyPhoto" title="<?=$val['port_slogan']?>">
                                	<img src="images/latest-projects/<?=$val['port_image']?>" alt="<?=$val['port_slogan']?>" /></a></div>
                                <div class="text"> 
                                	<a href="<?=$val['port_link'];?>" target="_blank"><< <?=$val['port_name'];?> >></a>
                                <span class="textarrow"></span></div>                            
                            </div>                        
                        </div>
                        <?php } ?>

                        
                        <!-- End 4 column portfolio -->
                    
                    </div>                
                </div>
            	<!-- End None Split Section -->

            </div>

            <span class="box-arrow"></span>
        
        </div>
        <!-- End Box -->
    
    </div>
    <!-- End Main Body Wrap -->

</div>

<!-- End Footer -->
<!-- Start Scroll To Top Div -->
<div id="scrolltab"></div>
<!-- End Scroll To Top Div -->
<script>
	//// Start Simple Sliders ////
	$(function() {
		setInterval("rotateDiv()", 10000);
	});
		
		function rotateDiv() {
		var currentDiv=$("#simpleslider div.current");
		var nextDiv= currentDiv.next ();
		if (nextDiv.length ==0)
			nextDiv=$("#simpleslider div:first");
		
		currentDiv.removeClass('current').addClass('previous').fadeOut('2000');
		nextDiv.fadeIn('3000').addClass('current',function() {
			currentDiv.fadeOut('2000', function () {currentDiv.removeClass('previous');});
		});
	
	}
	//// End Simple Sliders //// 
</script> 
